home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / SystemNotification.a < prev    next >
Text File  |  1996-05-01  |  5KB  |  194 lines

  1. ;
  2. ;    File:        SystemNotification.a
  3. ;
  4. ;    Contains:    System Notification Service Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 8
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__SYSTEMNOTIFICATION__') = 'UNDEFINED' THEN
  19. __SYSTEMNOTIFICATION__ SET 1
  20.  
  21.     IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
  22.     include 'Kernel.a'
  23.     ENDIF
  24.     IF &TYPE('__FILEMANAGERTYPES__') = 'UNDEFINED' THEN
  25.     include 'FileManagerTypes.a'
  26.     ENDIF
  27.     IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
  28.     include 'NameRegistry.a'
  29.     ENDIF
  30.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  31. ;
  32. ; * basic notification data structures and constants
  33. ;
  34.  
  35. kSNSMatchAnyService                EQU        '****'
  36. kSNSMatchAnyKind                EQU        '****'
  37. ; typedef OSType                         SNSService
  38.  
  39. ; typedef OSType                         SNSKind
  40.  
  41. SNSSubjectVariant        RECORD 0
  42. genericSubject             ds.b    256                ; offset: $0 (0)
  43.                          ORG 0
  44. nsObject                 ds.l    1                ; offset: $0 (0)
  45.                          ORG 0
  46. fsPersistence             ds        FSObjectPersistentReference ; offset: $0 (0)
  47.                          ORG 0
  48. fsObject                 ds        FSEventObjectSubject ; offset: $0 (0)
  49.                          ORG 0
  50. fsObjectProperty         ds        FSEventObjectPropertySubject ; offset: $0 (0)
  51.                          ORG 0
  52. nameRegistryEntry         ds        RegEntryRef        ; offset: $0 (0)
  53.                          ORG 256
  54. sizeof                     EQU *                    ; size:   $100 (256)
  55.                         ENDR
  56. ; typedef union SNSSubjectVariant *        SNSSubjectVariantPtr
  57.  
  58. SNSSubject                RECORD 0
  59. subjectLength             ds.l    1                ; offset: $0 (0)
  60. subject                     ds        SNSSubjectVariant ; offset: $4 (4)
  61. sizeof                     EQU *                    ; size:   $104 (260)
  62.                         ENDR
  63. ; typedef struct SNSSubject *            SNSSubjectPtr
  64.  
  65. SNSNotificationHeader    RECORD 0
  66. service                     ds.l    1                ; offset: $0 (0)
  67. kind                     ds.l    1                ; offset: $4 (4)
  68. subject                     ds        SNSSubject        ; offset: $8 (8)
  69. subscriberRefCon         ds.l    1                ; offset: $10C (268)
  70. infoLength                 ds.l    1                ; offset: $110 (272)
  71. sizeof                     EQU *                    ; size:   $114 (276)
  72.                         ENDR
  73. ; typedef struct SNSNotificationHeader * SNSNotificationHeaderPtr
  74.  
  75. SNSNotification            RECORD 0
  76. header                     ds        SNSNotificationHeader ; offset: $0 (0)
  77. info                     ds.b    1                ; offset: $114 (276) <-- really an array of length one
  78.                          ORG 278
  79. sizeof                     EQU *                    ; size:   $116 (278)
  80.                         ENDR
  81. ; typedef struct SNSNotification *        SNSNotificationPtr
  82.  
  83. ;
  84. ; * producer data structures and constants
  85. ;
  86.  
  87. kSNSFireAndForgetNotification    EQU        0
  88. kSNSRequireAllConsumersSucceed    EQU        $00000001
  89. kSNSRequireOneConsumerSucceed    EQU        $00000002
  90. ; typedef OptionBits                     SNSProduceOptions
  91.  
  92. ; typedef ObjectID                         SNSDistributorID
  93.  
  94. ;
  95. ; * consumer data structures and constants
  96. ;
  97. ; typedef ObjectID                         SNSConsumerID
  98.  
  99. ; typedef OSType                         SNSConsumerName
  100.  
  101. ;
  102. ; * producer interface
  103. ;
  104. ;
  105. ; extern OSStatus SNSFindDistributor(SNSService service, SNSKind kind, Boolean createDistributor, SNSDistributorID *distributor)
  106. ;
  107.     IF GENERATINGCFM THEN
  108.         IMPORT_CFM_FUNCTION SNSFindDistributor
  109.     ENDIF
  110.  
  111. ;
  112. ; extern OSStatus SNSProduce(SNSDistributorID distributor, void *notification, ByteCount notificationLength, void *subject, ByteCount subjectLength, SNSProduceOptions options)
  113. ;
  114.     IF GENERATINGCFM THEN
  115.         IMPORT_CFM_FUNCTION SNSProduce
  116.     ENDIF
  117.  
  118. ;
  119. ; extern OSStatus SNSProduceAsync(SNSDistributorID distributor, void *notification, ByteCount notificationLength, void *subject, ByteCount subjectLength, SNSProduceOptions options, KernelNotificationPtr completion)
  120. ;
  121.     IF GENERATINGCFM THEN
  122.         IMPORT_CFM_FUNCTION SNSProduceAsync
  123.     ENDIF
  124.  
  125. ;
  126. ; * consumer and subscription interface
  127. ;
  128. ;
  129. ; extern OSStatus SNSCreateConsumer(SNSConsumerName name, ItemCount maxPending, SNSConsumerID *consumer)
  130. ;
  131.     IF GENERATINGCFM THEN
  132.         IMPORT_CFM_FUNCTION SNSCreateConsumer
  133.     ENDIF
  134.  
  135. ;
  136. ; extern OSStatus SNSDeleteConsumer(SNSConsumerID consumer)
  137. ;
  138.     IF GENERATINGCFM THEN
  139.         IMPORT_CFM_FUNCTION SNSDeleteConsumer
  140.     ENDIF
  141.  
  142. ;
  143. ; extern OSStatus SNSSubscribe(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength, void *refCon)
  144. ;
  145.     IF GENERATINGCFM THEN
  146.         IMPORT_CFM_FUNCTION SNSSubscribe
  147.     ENDIF
  148.  
  149. ;
  150. ; extern OSStatus SNSUnsubscribe(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength)
  151. ;
  152.     IF GENERATINGCFM THEN
  153.         IMPORT_CFM_FUNCTION SNSUnsubscribe
  154.     ENDIF
  155.  
  156. ;
  157. ; extern OSStatus SNSHold(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength)
  158. ;
  159.     IF GENERATINGCFM THEN
  160.         IMPORT_CFM_FUNCTION SNSHold
  161.     ENDIF
  162.  
  163. ;
  164. ; extern OSStatus SNSUnhold(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength)
  165. ;
  166.     IF GENERATINGCFM THEN
  167.         IMPORT_CFM_FUNCTION SNSUnhold
  168.     ENDIF
  169.  
  170. ;
  171. ; extern OSStatus SNSFlush(SNSConsumerID consumer, SNSService service, SNSKind kind, void *subject, ByteCount subjectLength)
  172. ;
  173.     IF GENERATINGCFM THEN
  174.         IMPORT_CFM_FUNCTION SNSFlush
  175.     ENDIF
  176.  
  177. ;
  178. ; extern OSStatus SNSConsume(SNSConsumerID consumer, SNSNotificationPtr notification, ByteCount maxSize)
  179. ;
  180.     IF GENERATINGCFM THEN
  181.         IMPORT_CFM_FUNCTION SNSConsume
  182.     ENDIF
  183.  
  184. ;
  185. ; extern OSStatus SNSConsumeAsync(SNSConsumerID consumer, SNSNotificationPtr notification, ByteCount maxSize, KernelNotificationPtr completion)
  186. ;
  187.     IF GENERATINGCFM THEN
  188.         IMPORT_CFM_FUNCTION SNSConsumeAsync
  189.     ENDIF
  190.  
  191.     ENDIF
  192.     ENDIF ; __SYSTEMNOTIFICATION__ 
  193.  
  194.